package com.momo.seckilling.strategy;


import com.momo.seckilling.service.SeckillByService;

import java.util.HashMap;
import java.util.Map;
import java.util.concurrent.locks.Lock;
import java.util.concurrent.locks.ReentrantLock;

/**
 * Created by li on 2019/3/17.
 */
public class ProcedureLockBy implements  SeckillOperator{
    private Lock lock = new ReentrantLock();
    private SeckillByService seckillByService;
    public ProcedureLockBy(SeckillByService seckillByService){
        this.seckillByService = seckillByService;
    }

    @Override
    public Map<String,String> seckillBy(int userid, int id) {
        return seckillByService.procedureLockBy(userid,id);
    }
}
